package org.apache.jsp.tiles;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.Vector;

public final class header_jsp extends org.apache.jasper.runtime.HttpJspBase
    implements org.apache.jasper.runtime.JspSourceDependent {

  private static java.util.List _jspx_dependants;

  static {
    _jspx_dependants = new java.util.ArrayList(1);
    _jspx_dependants.add("/WEB-INF/lib/crosswire-i18n.tld");
  }

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_t_t;

  public Object getDependants() {
    return _jspx_dependants;
  }

  public void _jspInit() {
    _jspx_tagPool_t_t = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
  }

  public void _jspDestroy() {
    _jspx_tagPool_t_t.release();
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;


    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			null, true, 8192, true);
      _jspx_page_context = pageContext;
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");
      out.write("\r\n");
      out.write("<div id=\"contentTray0\">\r\n");
      out.write("<div id=\"contentTray1\">\r\n");
      out.write("<div id=\"contentTray2\">\r\n");
      out.write("  <div id=\"pageBorderTop\"></div>\r\n");
      out.write("  <div id=\"header\">\r\n");
      out.write("    <h1>The Bible Tool</h1>\r\n");
      out.write("  </div>\r\n");
      out.write("  <div id=\"navlist\">\r\n");
      out.write("    <ul>\r\n");

	Vector [] tabs = (Vector[])session.getAttribute("tabs");
	Vector showTabs = (Vector)session.getAttribute("showTabs");
	for (int i = 0; i < tabs[0].size(); i++) {
		String u = (String)request.getRequestURI();
		String n = (String)tabs[0].get(i);
		String t = (String)tabs[1].get(i);
		String l = (String)tabs[2].get(i);
		boolean show = !("false".equals((String)showTabs.get(i)));
		if ((show) || ("preferences.jsp".equals(l))) {

      out.write("\r\n");
      out.write("      <li><a ");
      out.print( (u.endsWith(l))?"id=\"current\"":"" );
      out.write(" href=\"");
      out.print( l );
      out.write("\" title=\"");
      out.print( t );
      out.write('"');
      out.write('>');
      //  t:t
      org.crosswire.web.i18n.TranslateTag _jspx_th_t_t_0 = (org.crosswire.web.i18n.TranslateTag) _jspx_tagPool_t_t.get(org.crosswire.web.i18n.TranslateTag.class);
      _jspx_th_t_t_0.setPageContext(_jspx_page_context);
      _jspx_th_t_t_0.setParent(null);
      int _jspx_eval_t_t_0 = _jspx_th_t_t_0.doStartTag();
      if (_jspx_eval_t_t_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_t_t_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          out = _jspx_page_context.pushBody();
          _jspx_th_t_t_0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
          _jspx_th_t_t_0.doInitBody();
        }
        do {
          out.print( n );
          int evalDoAfterBody = _jspx_th_t_t_0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
        if (_jspx_eval_t_t_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          out = _jspx_page_context.popBody();
        }
      }
      if (_jspx_th_t_t_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        _jspx_tagPool_t_t.reuse(_jspx_th_t_t_0);
        return;
      }
      _jspx_tagPool_t_t.reuse(_jspx_th_t_t_0);
      out.write("</a></li>\r\n");
		}
	}	
      out.write("\r\n");
      out.write("    </ul>\r\n");
      out.write("  </div>\r\n");
    } catch (Throwable t) {
      if (!(t instanceof SkipPageException)){
        out = _jspx_out;
        if (out != null && out.getBufferSize() != 0)
          out.clearBuffer();
        if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
      }
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
    }
  }
}
